package com.xx.sg.own.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("sg_fire_info")
public class FireInfo {

    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    //报警名称
    @TableField(value = "name")
    private String name;

    //预警来源（电话接警 phone、卫星监测 satellite、视频监测 video、应急演练 drill、雷电监测 leidian）
    @TableField(value = "classify")
    private String classify;

    //经度
    @TableField(value = "longitude")
    private Double longitude;

    //纬度
    @TableField(value = "latitude")
    private Double latitude;

    //区域
    @TableField(value = "region_id")
    private String regionId;

    //描述
    @TableField(value = "memo")
    private String memo;

    //报警人
    @TableField(value = "linkman")
    private String linkman;

    //联系电话
    @TableField(value = "phone")
    private String phone;

    //火情地址
    @TableField(value = "address")
    private String address;

    //处置状态（待核查、核查中、待处置、处置中、已处置）
    @TableField(value = "status")
    private String status;

    //核查结果（确认、重复、误报）
    @TableField(value = "result")
    private String result;

    //核查结果类型
    @TableField(value = "result_type")
    private String resultType;

    //核查结果原因
    @TableField(value = "result_reason")
    private String resultReason;

    //核查结果备注
    @TableField(value = "result_memo")
    private String resultMemo;

    //重复火情ID
    @TableField(value = "repeat_fire_id")
    private String repeatFireId;

    //来源Id
    @TableField(value = "source_id")
    private String sourceId;

    //图片
    @TableField(value = "picture")
    private String picture;

    //报警时间
    @TableField(value = "datetime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime datetime;

    //火情确认/误报时间，审核时间
    @TableField(value = "checked_datetime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime checkedDatetime;

    @TableField(exist = false)
    private String day;

    @TableField(exist = false)
    private List<String> statusList;
}
